package demo26;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if (n == 0 || n == 1){
            System.out.println(1);
            return;
        }

        int f1 = 1;
        int f2 = 1;
        int cur = 0;
        for (int i = 2; i <= n; i++) {
            cur = f1 + f2;
            f1 = f2;
            f2 = cur;
        }
        System.out.println(cur);
    }
}
